<?php

namespace app\admin\controller\repertory;

use app\admin\controller\Controller;

/**
 * 菜单
 */
class Menus extends Controller
{
    /**
     * 菜单列表
     */
    public function getMenuList()
    {
        $params = $this->postData();
        $data = [
            [
                "id" => 1,
                "name" => "売上管理",
                "indexs" => "F01",
                "icon" => "icon-authority",
                "path" => "/access",
                "redirect" => "/home?id=1",
                "children" => [
                    [
                        "id" => 1101,
                        "name" => "売上履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1102,
                        "name" => "予約履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1103,
                        "name" => "売上外入出金履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1104,
                        "name" => "日締処理",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1105,
                        "name" => "売上アイテムリスト",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1106,
                        "name" => "売上外入出金理由マスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1107,
                        "name" => "取置履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1008,
                        "name" => "会員力ード再発行",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1109,
                        "name" => "取置アイテムリスト",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1110,
                        "name" => "奉行連携",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 2,
                "name" => "会員管理",
                "indexs" => "F02",
                "icon" => "icon-authority",
                "path" => "/shop",
                "redirect" => "/home?id=2",
                "children" => [
                    [
                        "id" => 1201,
                        "name" => "会員リスト",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1202,
                        "name" => "ニュース一覧",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1203,
                        "name" => "会員ランクマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1204,
                        "name" => "ポイント加算",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1205,
                        "name" => "会員情報統合",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1206,
                        "name" => "顧客購買履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1207,
                        "name" => "帳目リスト",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1208,
                        "name" => "収支項目管理",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1209,
                        "name" => "システム設置",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 3,
                "name" => "在庫管理",
                "indexs" => "F03",
                "icon" => "icon-authority",
                "path" => "/message",
                "redirect" => "/home?id=3",
                "children" => [
                    [
                        "id" => 1301,
                        "name" => "実地棚卸数量",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1302,
                        "name" => "入庫履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1303,
                        "name" => "出庫履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1304,
                        "name" => "商品移動履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 4,
                "name" => "棚卸管理",
                "indexs" => "F04",
                "icon" => "icon-authority",
                "path" => "/setting",
                "redirect" => "/home?id=4",
                "children" => [
                    [
                        "id" => 1401,
                        "name" => "棚卸差益履歷照会",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1402,
                        "name" => "棚卸差損履歷照会",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1403,
                        "name" => "棚卸開始",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 5,
                "name" => "卸・請求",
                "indexs" => "F05",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 1501,
                        "name" => "請求書",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1502,
                        "name" => "領収書",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1503,
                        "name" => "見積書",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1504,
                        "name" => "納品書",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1505,
                        "name" => "発注書",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 6,
                "name" => "商品マスタ",
                "indexs" => "F06",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 1601,
                        "name" => "商品管理",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1602,
                        "name" => "分類マスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1603,
                        "name" => "計量単位管理",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 7,
                "name" => "OES設定",
                "indexs" => "F07",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 1701,
                        "name" => "分類マスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1702,
                        "name" => "OESメニューカテゴリ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1703,
                        "name" => "レジメニューマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1704,
                        "name" => "テーブルグループマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1705,
                        "name" => "OESメニューマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1706,
                        "name" => "レジメニューグループマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1707,
                        "name" => "テーブルマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1708,
                        "name" => "商品マスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1709,
                        "name" => "プリンタタイプマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1710,
                        "name" => "レシピマスタ",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 8,
                "name" => "基本設定",
                "indexs" => "F08",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 1801,
                        "name" => "会社情報",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 1802,
                        "name" => "タグ管理",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 9,
                "name" => "システム構成",
                "indexs" => "F09",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "",
                "children" => [],
            ],
            [
                "id" => 10,
                "name" => "顧客管理",
                "indexs" => "F10",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 10101,
                        "name" => "顧客一覧",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 10102,
                        "name" => "顧客購買履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 10103,
                        "name" => "対応履歴",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 11,
                "name" => "口座管理",
                "indexs" => "F11",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 11101,
                        "name" => "口座設定",
                        "icon" => null,
                        "path" => "",
                    ],
                    [
                        "id" => 11102,
                        "name" => "口座管理",
                        "icon" => null,
                        "path" => "",
                    ],
                ],
            ],
            [
                "id" => 12,
                "name" => "システム設定",
                "indexs" => "F12",
                "icon" => "icon-authority",
                "path" => "/password",
                "redirect" => "",
                "children" => [],
            ],
            [
                "id" => 13,
                "name" => "管理倉庫",
                "indexs" => "F13",
                "icon" => "icon-authority",
                "path" => "/stock",
                "redirect" => "/stock/Index",
                "children" => [],
            ],
            [
                "id" => 14,
                "name" => "权限管理",
                "indexs" => "F14",
                "icon" => "icon-authority",
                "path" => "/system",
                "redirect" => "/home?id=5",
                "children" => [
                    [
                        "id" => 14101,
                        "name" => "部门管理",
                        "icon" => null,
                        "path" => "/system/dept/Index",
                    ],
                    [
                        "id" => 14102,
                        "name" => "用户管理",
                        "icon" => null,
                        "path" => "/system/user/Index",
                    ],
                    [
                        "id" => 14103,
                        "name" => "角色管理",
                        "icon" => null,
                        "path" => "/system/role/Index",
                    ],
                ],
            ],
        ];
        $datas = [];
        foreach ($data as $key => $value) {
            if ($value["id"] == $params["id"]) {
                $datas = $value["children"];
            }
        }
        return $this->renderSuccess("", $datas);
    }

    public function index()
    {

    }
}